class Event {
  static TYPE_TIMING = 1
  static TYPE_WARNING = 2
  static TYPE_ALARM = 3
  static TYPE_DEVICE_OFFLINE = 4

  static typeList = [
    {value: Event.TYPE_TIMING, name: '定时图片'},
    {value: Event.TYPE_WARNING, name: '预警'},
    {value: Event.TYPE_ALARM, name: '告警'},
    {value: Event.TYPE_DEVICE_OFFLINE, name: '设备离线'}
  ]

  static getTypeText (type) {
    for (let index in Event.typeList) {
      if (Event.typeList[index].value === type) {
        return Event.typeList[index].name
      }
    }
    return ''
  }
}

export default Event
